using System;
using UnityEngine;
using UnityEngine.UI;

namespace CGF
{
    //该脚本自动生成或覆盖，不可编辑
    public partial class GameUI
    {   
		public RectTransform Container;
		public RectTransform Navigation;
		public GameObject TabWallet;
		public GameObject TabDevices;
		public GameObject TabInvites;
		public GameObject TabMe;
		public I18N i18n;

        public Reference reference { get; private set; }
        public Action onProsBindCompleted;
        
        public void BindProperties(Transform transform)
        {   
            reference = transform.GetComponent<Reference>();
            if(!reference)return;
            int nodeIndex = 0;
			Container = (reference.nodes[nodeIndex++].obj as GameObject).GetComponent<RectTransform>();
			Navigation = (reference.nodes[nodeIndex++].obj as GameObject).GetComponent<RectTransform>();
			TabWallet = reference.nodes[nodeIndex++].obj as GameObject;
			TabDevices = reference.nodes[nodeIndex++].obj as GameObject;
			TabInvites = reference.nodes[nodeIndex++].obj as GameObject;
			TabMe = reference.nodes[nodeIndex++].obj as GameObject;
			i18n = transform.GetComponent<I18N>();
            onProsBindCompleted?.Invoke();
        }
        
        public void SetProsBindCompletedAction(Action action)
        {
            onProsBindCompleted = action;
        }

		public string I18N_service_offline { get { return i18n.GetTextByKey("service_offline"); } }
    }
}
